package handler

import (
	"web_framework/model"
	"github.com/gorilla/websocket"
		"strconv"
	"web_framework/storage"
	"github.com/lexkong/log"
	)

//推送下载任务队列响应接口
type DelStorageFileHandle struct {
}

func (delStorageFileHandle DelStorageFileHandle) handleMsg(data model.Request, conn *websocket.Conn, sn string) (result model.Response) {
	//更新删除任务缓存标记状态
	deleteFileMidCacheKey := storage.RedisDelPathMidCacheKey + sn + ":" + strconv.Itoa(data.Mid)
	if  storage.RedisExists(deleteFileMidCacheKey){
		if bool,_ := storage.RedisSet(deleteFileMidCacheKey, 1 , 20);bool == false{
			log.Info("更新删除文件缓存标记失败")
		}
	}

	return model.Response{}
}
